package cn.com.blueInfo.bpm.person.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.person.entity.PostDef;
import cn.com.blueInfo.bpm.person.request.PostDefDTO;
import cn.com.blueInfo.bpm.person.response.PostDefVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 岗位定义表 对象转换
 * @author suxch
 * @since 2025-08-31 16:18:02
 */
@Mapper(componentModel = "spring")
public interface PostDefConvert
        extends BaseConvert<PostDef, PostDefDTO, PostDefVO> {

    PostDef dtoToEntity(PostDefDTO dto);

    PostDef dtoToEntity(PostDefDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    PostDefVO entityToVO(PostDef entity);

}